<%@ include file="/common/taglibs.jsp"%>
<%@ taglib prefix="customer" tagdir="/WEB-INF/tags/customer"%>
<%@ taglib prefix="system" tagdir="/WEB-INF/tags/system"%>

<title><fmt:message key="addressDetail.title" /></title>
<content tag="position">
	<fmt:message key="accountMenu.personInfo" /> &gt; <a href="${ctxPath}/customer/csAddressList.html"></a> &gt; <b><fmt:message key="addressDetail.heading" /></b>
	<span style="float:right;"><a href="${ctxPath}/customer/csEditAddress.html">&lt;&lt;<fmt:message key="button.back" /></a></span>
</content>

<spring:bind path="address.*">
	<c:if test="${not empty status.errorMessages}">
	<div class="error_txt">
		<c:forEach var="error" items="${status.errorMessages}">
			<p><c:out value="${error}" escapeXml="false" /></p>
		</c:forEach>
	</div>
	</c:if>
</spring:bind>


<form method="post" action="${ctxPath}/customer/csEditAddress.html" id="address" onsubmit="return validateAddress(this);">
	<input type="hidden" name="isDefaultShippingAddress" value="${address.isDefaultShippingAddress}">
	<input type="hidden" name="isDefaultBillingAddress" value="${address.isDefaultBillingAddress}">
	<input type="hidden" name="version" value="${address.version}"/>
	<input type="hidden" name="addressId" value="${address.addressId}"/>
	<input type="hidden" name="appuserId" id="appuserId" value="${address.appuserId}" />
	<input type="hidden" name="doAction" value="save" />
	<div class="tab_06">
		<ul class="content clearfix">
			<li>
				<span>
					<c:choose>
						<c:when test="${empty address.addressId}"><fmt:message key="address.addLabel" /></c:when>
						<c:otherwise><fmt:message key="address.modify" /></c:otherwise>
					</c:choose>
				</span>
			</li>
		</ul>
	</div>
	<div class="display_info">
		<table width="100%" border="0" cellspacing="0" cellpadding="0" class="table_display">
			<tr>
				<th width="20%"><fmt:message key="address.firstname" /><span class="red">*</span>：</th>
				<td>
					<spring:bind path="address.firstname">
						<input type="text" name="${status.expression}"  style="width:180px"
							id="${status.expression}" value="${status.value}" size="33" class="inputtxt2"/>
						<span class="fieldError"><c:out value="${status.errorMessage}" /></span>
					</spring:bind>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="address.email" /><span class="red">*</span>：</th>
				<td>
					<spring:bind path="address.email">
						<input type="text" name="${status.expression}" style="width:180px"
							id="${status.expression}" value="${status.value}" class="inputtxt2"/>
						<span class="fieldError"><c:out value="${status.errorMessage}" /></span>
					</spring:bind>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="address.telephone" /><span class="red">*</span>： </th>
				<td>
					<spring:bind path="address.telephone">
						<input type="text" name="${status.expression}" style="width:180px"
							id="${status.expression}" value="${status.value}" class="inputtxt2"/>
						<span class="fieldError"><c:out value="${status.errorMessage}" /></span>
					</spring:bind>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="address.zip" />：</th>
				<td>
					<spring:bind path="address.zip">
						<input type="text" name="${status.expression}" style="width:180px"
							id="${status.expression}" value="${status.value}" class="inputtxt2" />
						<span class="fieldError"><c:out value="${status.errorMessage}" /></span>
					</spring:bind>
				</td>
			</tr>
			
			<tr>
				<th><fmt:message key="address.region" /><span class="red">*</span>：</th>
				<td>
					<system:regionLinkageSelector selectorId="regionLinkageSelector" regionId="${address.regionId}" needValidate="true"/>
				</td>
			</tr>
			<tr>
				<th><fmt:message key="address.address" /><span class="red">*</span>：</th>
				<td>
					<spring:bind path="address.address">
						<input type="text" name="${status.expression}" style="width:300px" 
							id="${status.expression}" validconf="required,maxlength=128" value="${status.value}"
							class="inputtxt2" />
						<span class="fieldError"><c:out value="${status.errorMessage}" /></span>
					</spring:bind>
				</td>
			</tr>
			
			
		</table>
	</div>
	<div class="profile_go"><input onclick="bCancel=false" name="save" type="image" src="${txtImagePath}/btn_submit_01.gif" alt="<fmt:message key="button.confirm" />" /></div>
</form>


<c:set var="probizJs_region" value="true" scope="request"/>	
<v:javascript formName="address" staticJavascript="false" />
<script type="text/javascript">
</script>
